package d1203.r211.num05;

import java.util.Scanner;

public class Number {
    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        System.out.println("请输入一个字符串");
        String s=sc.nextLine();
        String[] str=s.split("a");
        String sum="";
        for(String i:str){
            sum=sum+i;
        }
        int len=sum.length();
        System.out.println(s.length()-len);
    }
}
